Load a Baseline but ignore the default view

All,

I've written some DXL that I am running interactively and am having an issue supressing errors while going through baselines.

Specifically, my code goes through each baseline in a module and opens it. The problem is that somewhere between baseline 1.2 and the current module an attribute was created and the default view of the module has a filter on that attribute. So when the baseline is opened, DOORS presents an error about the view.

I do not get this error when running my code, but I do get a DXL Error unknown Object attribute (attribute name) and then execution halts, according to DOORS, but execution actually continues.

The code works, but when it hits a module like above, I have to dismiss the "There was a DXL error" dialog box when the above situation is encountered, and thus I have to babysit my code. Putting in a noError doesn't help. Loading the current module with read(name, true, true) doesn't help either.

Does anyone have any ideas as to how I can avoid this problem?

Thanks!
Kevin Murphy
http://www.baselinesinc.com
kbmurphy - Tue Jul 12 14:22:52 EDT 2011

Re: Load a Baseline but ignore the default view
OurGuest - Tue Jul 12 15:27:06 EDT 2011

See if this works: disableDisplayWarnings()

Re: Load a Baseline but ignore the default view
llandale - Tue Jul 12 15:39:34 EDT 2011

Don't think I've ever done it but you can turn on logging which will trap DXL errors and redirect them to some file.

I had some luck surrounding the open module/load baseline with noError and lastError, but I don't think they worked all that well.

Seems to me, however, is that the Default view needs to be changed so when you open the baseline it loads the standard view. This extract from a similar function may get you going:

NameDefault    = getDefaultViewForUser(mod)
ErrMess         = setDefaultViewForUser(mod, "Standard view")
if (!null ErrMess)      //-
then LoadOK     = false // No such view
else
{  // load baseline here //read(NameModFull, false, false)    // Invis, don't load standard view
               // Now reinstate the original default view for you
   if (null NameDefault)        //-
   then clearDefaultViewForUser(mod)
   else setDefaultViewForUser  (mod, NameDefault)
}


Maybe you could play with that and turn it into some sort of
"fLoadBaselineStandard(Module mod, Baseline bl)" function that loads the baseline using the Standard view.

 

 

  • Louie

 

 

Re: Load a Baseline but ignore the default view
OurGuest - Thu Jul 28 11:04:38 EDT 2011

If I recall, user Reik_Schroeder had found a solution and it was posted in the old forum.

Re: Load a Baseline but ignore the default view
SystemAdmin - Thu Jul 28 11:28:06 EDT 2011

OurGuest - Thu Jul 28 11:04:38 EDT 2011
If I recall, user Reik_Schroeder had found a solution and it was posted in the old forum.

I have been using opening the module and loading the standard view to avoid a similar problem. The downside is that it doesn't appear possible to load a view unless you visibily open the module.

Re: Load a Baseline but ignore the default view
llandale - Sun Jul 31 23:02:15 EDT 2011

SystemAdmin - Thu Jul 28 11:28:06 EDT 2011
I have been using opening the module and loading the standard view to avoid a similar problem. The downside is that it doesn't appear possible to load a view unless you visibily open the module.

IIRC a visible module allows you to switch views using the "load(view)" command but "read(module)" does not; but when invisible you cannot "load(view)" but you can use "read(module)" to load a view, cleverly switching the default view as per the following: You remember the current default view for the user and the module, and reinstate these at the bottom. In the middle you can set the default view for the user to the desired view then load the module invisibly.

Posted this code but not good at searching forums.

  • Louie